class Whoa {
    Employee member
    Project worksInProject
    Course worksInCourse
    Integer year
    Double hours
    
    

    public Float calculateCost(){
        return (member.salary * hours)/ member.getWorkingHoursPerYear()
    }

    boolean forCourse() {
        if (worksInCourse == null) { return false }
        else {return true}
    }


    static constraints = {
        worksInCourse(nullable:true)
        worksInProject(nullable:true)
    }

    String toString(){
        return "member:"+member?.id+"; project:"+worksInProject?.id
    }
}
